import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import setupPlugins from "./vite/plugins/index"
//import vitePluginVueSetupExtend from "vite-plugin-vue-setup-extend"

// https://vitejs.dev/config/
export default defineConfig(({command,mode:string})=>{
  const isBuild = (command=='build')?true:false;
return{
  plugins: [
    vue(),
    ...setupPlugins(isBuild)
    //vitePluginVueSetupExtend()
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
}
})
